         {include file='header.html'}
        <link type="text/css" href="../../page/css/reset.css" rev="stylesheet" rel="stylesheet">
        <link type="text/css" href="../../page/css/kaoqin.css" rev="stylesheet" rel="stylesheet">
        <link type="text/css" href="{$common_domain}/tools/datepicker/jquery.ui.theme.css" rel="stylesheet" />
        <link type="text/css" href="{$common_domain}/tools/datepicker/jquery.ui.datepicker.css" rel="stylesheet" />
        <link type="text/css" href="{$common_domain}/tools/datepicker/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
        <script type="text/javascript" src="{$common_domain}/tools/datepicker/jquery-1.7.2.js"></script>
        <script type="text/javascript" src="{$common_domain}/tools/datepicker/jquery.ui.core.js"></script>
        <script type="text/javascript" src="{$common_domain}/tools/datepicker/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="{$common_domain}/tools/datepicker/jquery.ui.datepicker.js"></script>
        <script type="text/javascript" src="{$common_domain}/tools/datepicker/DateTimePicker.js"></script>
        <div id="content">
                <div class="main">
                    <!--我的年假begin-->

                    <div class="div_date">
                        <i class="i_l">&nbsp;</i>
                        <span class="sp_c">{$page.curr_time} </span>
                        <i class="i_r">&nbsp;</i>
                        <div class="clear"></div>
                    </div>
                    <div class="titname">
                        <a href="/" class="selected">每日考勤</a>
                        <a href="/attendance/">考勤明细</a>
                        <a href="/myannual/">我的年假</a>
                        <a href="/myapply/">我的申请</a>
                    </div>
                    <div class="p p2">
                        <form name="form" action="/more/" method="get">
                            <input value="{if $params['start'] neq null}{$params['start']}{/if}" type="text" name="start" id="start" value=""  class="jko notime" style="width:130px; margin-left:7px;" readonly="readonly" size="50"/>至
                            <input value="{if $params['end'] neq null}{$params['end']}{/if}" type="text" name="end" id="end" value="" class="jko notime" style="width:130px" readonly="readonly"/>
                            <button class="btn" type="submit">查&nbsp;&nbsp;询</button>
                        </form>
                        <div class="clear"></div>
                    </div>

                    <table class="p p3_day" cellpadding="0" cellspacing="0" border="0">
                        <tr class="fir">
                            <td class="i0 i2r">日期</td>
                            <td class="i0 i4r">上班时间</td>
                            <td class="i0 i3r">考勤状态</td>
                            <td class="i0 i5r">说明</td>
                        </tr>
                        {foreach from=$list key=k item=v}
                        <tr {if $k eq 6} class="last"{/if}>
                            <td class="i0 i2r"{if $v.week eq '六' or $v.week eq '日'} style="color:#0c7fd4;"{/if}>{$v.view_date}</td>
                            <td class="i0 i4r">{if $v.view_work}{$v.view_work}{else}&nbsp;{/if} </td>
                            <td class="i0 i3r">
                            {if $v.view_record neq null}
                                {if $v.view_work eq '正常' || $v.view_record eq '周末加班辛苦了' || $v.view_record eq '无考勤数据'|| $v.view_record eq '法定节假日'}
                                     {if $v.view_record eq '周末加班辛苦了'}&nbsp;{else}{$v.view_record}{/if}
                                {else}
                                    {if $v.view_record=='<span class="img1">&nbsp;</span>'}
                                         <span class="img1">&nbsp;</span>
                                    {else}

                                        {foreach from=$v.view_record key=ty item=st}
                                        {$st.type}
                                        {if $st.leave_id}
                                            {if $st.type!=$st.leave_reason}({$st.leave_reason}){/if}({$st.leave_status})
                                        {else}
                                            {$st.html_url}
                                        {/if}
                                        {$st.upload_prove}
                                        <br/>
                                        {/foreach}
                                    {/if}
                                {/if}

                            {else}
                            &nbsp;
                            {/if}
                            </td>
                            <td class="i0 i5r">
                            {if $v.view_detail neq null}
                                {foreach from=$v.view_detail key=rsn item=rs}
                                    {if $rs}
                                        类别:{$rs.type}&nbsp;&nbsp;
                                        原因:{$rs.leave_desc}
                                        <br>
                                    {/if}
                                {/foreach}
                            {else}
                                &nbsp;
                            {/if}
                            </td>
                        </tr>
                        {/foreach}
                    </table>
                    <div class="p p3 p33">
                        {if $page.pre}
                        <a href="{$page.pre}">上一页</a>
                        {else}
                        上一页
                        {/if}
                        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        {if $page.next}
                        <a href="{$page.next}">下一页</a>
                        {else}
                        下一页
                        {/if}
                    </div>
                        <!--我的年假end-->



                        <!--我的申请begin-->
                        <!--我的年假end-->
                </div>
            </div>
        </div>
<script type="text/javascript">
             $(document).ready(function() {
                        $("#start").datetimepicker();
                        $("#end").datetimepicker();
                        $.datetimepicker.after_set = function($this){
                            var start_time = $('#start').val();
                            var end_time = $('#end').val();
                            if(start_time != '' && end_time != ''){
                                if( get_time(start_time) > get_time(end_time)) {
                                    $this.val("");
                                }
                            }
                            return;
                     }});
             function get_time(datetime){
                 datetime =datetime+" 00:00:00";
                 var startDateTemp = datetime.split(" ");
                 var arrStartDate = startDateTemp[0].split("-");
                 var arrStartTime = startDateTemp[1].split(":");
                 var allStartDate = new Date(arrStartDate[0], arrStartDate[1], arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);
                 return allStartDate.getTime();
             }
</script>
    </body>
</html>
